#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
from multiprocessing import Process
from multiprocessing import Array

def func(i, temp):
    temp[0] += 100
    # print(temp[0])
    print("进程： {0}, 修改数组第一个元素 {1}".format(i, temp[0]))

if __name__ == '__main__':
    temp = Array('i', [1,2,3,4])
    for i in range(5):
        p = Process(target=func, args=(i, temp))
        p.start()
